const app = getApp();
Component({
  properties: {
    // 可扩展搜索内容、placeholder等属性
  },
  data: {
    filterIcon: app.getImgUrl('filter.png'),
    showPopover: false
  },
  methods: {
    onTogglePopover() {
      this.setData({ showPopover: !this.data.showPopover });
    },
    onHidePopover() {
      this.setData({ showPopover: false });
    },
    onPopoverItemTap(e) {
      const { value } = e.currentTarget.dataset;
      wx.showToast({ title: `选择了${value}`, icon: 'none' });
      this.setData({ showPopover: false });
    }
  }
}) 